import request from "@/utils/request";

// 试卷树形
export function testPaper() {
  return request({
    url: "/api/xy_ks_paper_type/Xy_ks_paper_type",
    method: "get"
  });
}

// 新增树节点
export function addTreeNode(data) {
  return request({
    url: "/api/xy_ks_paper_type/Xy_ks_paper_type",
    method: "post",
    data
  });
}

// 删除树节点
export function deleteTreeNode(id) {
  return request({
    url: `/api/xy_ks_paper_type/Xy_ks_paper_type/${id}`,
    method: "delete"
  });
}

// 编辑树节点
export function editTreeNode(id, data) {
  return request({
    url: `/api/xy_ks_paper_type/Xy_ks_paper_type/${id}`,
    method: "put",
    data
  });
}
